package com.ruoyi.system.habit.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pagehelper.PageInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author: xujiabing
 * @date: 2024-10-15 10:19
 * @description 打卡习惯dto
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class HabitDTO extends PageInfo {

    //id 自增长
    private Integer id;

    //习惯名称
    @NotBlank(message = "习惯名称不能为空")
    private String name;

    //图片url
    private String iconUrl;

    //用户id
    @NotNull(message = "用户id不能为空")
    private Integer uid;

    //总打卡天数
    private Integer totalDays;

    //当前连续天数
    private Integer currentContinue;

    //最高连续
    private Integer mostContinue;

    //今天是否已经打卡 1是 0否
    private Integer isClockToday;

    //创建时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

}
